package com.ccys.db.vo.app.getStarted;

import com.ccys.db.dto.app.getStarted.PrepareForBookingDto;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author：XLY
 * @Date：2024/1/22 0022
 */

@Data
public class PrepareBookingVo {


    @JsonProperty("child_id")
    private String childId;

    @JsonProperty("booking_id")
    private String bookingId;

    @JsonProperty("booking_code")
    private String bookingCode;

    @JsonProperty("G6PD")
    private boolean g6pd;

    private boolean pregnant;

    private List<String> symptoms;

    @JsonProperty("symptom_photos")
    private List<PrepareForBookingDto.SymptomPhotoVo> symptomPhotos;

    private List<PrepareForBookingDto.MedicationVo> medications;


    private List<PrepareForBookingDto.AllergyVo> allergies;

    private List<PrepareForBookingDto.ReactionVo> reactions;

    @JsonProperty("deeplink_id")
    public String deeplinkId;


    // TODO: 2024/1/22 0022 转介绍信
    @JsonProperty("specialist_referral_letter_photos")
    public List<Object> specialistReferralLetterPhotos;

    @JsonProperty("consult_type")
    public Integer consultType;

    @JsonProperty("emergency_contact")
    public PrepareForBookingDto.EmergencyContact emergencyContact;

    @JsonProperty("consulting_from_address")
    public PrepareForBookingDto.LocationDetectionModel consultingFromAddress;

    @JsonProperty("mem_delivery_address_id")
    public String memDeliveryAddressId;

    @JsonProperty("service_type")
    public Integer serviceType;

    @JsonProperty("deeplink_identifier_for_tracking")
    public String deeplinkIdentifierForTracking;

    @Data
    public static class LocationDetectionModel{

        @JsonProperty("location_address")
        private String locationAddress;

        @JsonProperty("location_country")
        private String locationCountry;

        @JsonProperty("location_postal_code")
        private String locationPostalCode;

        @JsonProperty("location_latitude")
        private BigDecimal locationLatitude;

        @JsonProperty("location_longitude")
        private BigDecimal locationLongitude;

        @JsonProperty("location_floor_number")
        private String locationFloorNumber;

        @JsonProperty("location_detail_address")
        private String locationDetailAddress;

        @JsonProperty("location_state")
        private String locationState;

        @JsonProperty("location_city")
        private String locationCity;

    }


    @Data
    public static class SymptomPhotoVo{

        @JsonProperty("image_name")
        private String imageName;

        @JsonProperty("booking_image_id")
        private String bookingImageId;
    }


    @Data
    public static class MedicationVo{


        @JsonProperty("MDMedication_ID")
        private String MDMedicationID;


        @JsonProperty("MDMedicationUsagePeriod_ID")
        private String MDMedicationUsagePeriodID;


        @JsonProperty("amount_of_dosage")
        private String amountOfDosage;

    }


    @Data
    public static class AllergyVo{

        @JsonProperty("MDAllergies_ID")
        private String MDAllergiesID;


        @JsonProperty("mem_allergies_index")
        private String memAllergiesIndex;
    }


    @Data
    public static class ReactionVo{

        @JsonProperty("MD_MedicationReaction_ID")
        private String MDMedicationReactionID;

        @JsonProperty("mem_medication_reaction_index")
        private String memMedicationReactionIndex;

    }


    @Data
    public static class EmergencyContact{

        @JsonProperty("first_name")
        private String firstName;

        @JsonProperty("last_name")
        private String lastName;

        private String phone;

        private String relationship;
    }



}
